<?php 
/**
 * Parameters
 * @param Doctrine_Collection $members Collection of members assigned to the current organizational unit
 * @param boolean $checkboxes Whether checkboxes are visible or not
 * @param array $checked_checkboxes Array of member ids whose checkboxes are checked
 * @param integer $year
 */
?>
<?php $checkboxes = isset($checkboxes) ? $checkboxes : false; ?>
<?php $checked_checkboxes = isset($checked_checkboxes) ? $checked_checkboxes : array(); ?>
<?php if(!isset($year)) $year = date("Y");?>

			<table class="data display datatable" id="example">
				<thead>
					<tr>
						<?php if($checkboxes === true):?><th><input type="checkbox" /></th><?php endif;?>
						<th></th>
						<th></th>
						<th></th>
						<th></th>
						<th>Name</th>
						<th>Vorname(n)</th>
						<th>Optionen</th>
					</tr>
				</thead>
				<tbody>
				<?php if(count($members) > 0):?>
				<?php foreach($members as $i => $member):?>
					<?php include_partial('member/list_item', array('member' => $member, 'organizational_unit' => $organizational_unit, 'checkboxes' => $checkboxes, 'checked_checkboxes' => $checked_checkboxes, 'year' => $year));?>
				<?php endforeach;?>
				<?php else:?>
					<tr>
						<td colspan="8"><i>Keine Mitglieder gefunden.</i></td>
					</tr>
				<?php endif;?>
				</tbody>
			</table>